<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddAdvPlaceTypeToAdvToutiaos extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('adv_toutiaos', function (Blueprint $table) {
            $table->tinyInteger('adv_place_type')->default(0)->comment('头条渠道ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if(Schema::hasTable('adv_toutiaos')){
            Schema::table('adv_toutiaos', function (Blueprint $table) {
                $table->dropColumn('adv_place_type');
            });
        }
    }
}
